# for topic 11 a discrete probabilities # create our table # first get the individual measures vals <- c( 14, 17, 18, 22, 23, 25 ) # then get the number of times each measure # needs to happen marble <- c( 23, 34, 19, 25, 12, 17 ) # then make the population of marbles all_marbles <- rep( vals, marble) # and look at them all_marbles # just to be sure we conform, make a # frequency table source("../make_freq_table.R") make_freq_table(all_marbles ) # then we can find the mean and standard # deviation of our population of marbles mean( all_marbles ) # remember this is a population source( "../pop_sd.R") pop_sd( all_marbles ) # But what if we had a different population # that still conformed to the probabilities # that we were given big_pop <- rep( all_marbles, 7 ) # just to be sure we conform, make a # frequency table make_freq_table( big_pop ) # find the mean and standard deviation of this mean( big_pop ) pop_sd( big_pop )